package com.dp.proxy.dynamicCGLIB;

import java.lang.reflect.Proxy;

/**
 * @Author: dupeng
 * @CreateTime: 2025-01-07  10:31
 * @Description: TODO
 */
public class Main {

    public static void main(String[] args) {
        //创建目标类
        UserService userService = new UserService();
        //创建增强类
        UserServiceProxy userServiceProxy = new UserServiceProxy(userService);
        //创建代理类
        UserService proxy = (UserService) userServiceProxy.createProxy();
        //代理类调用
        proxy.getName();
    }

}
